<template>
  <div class="contents">
    <PanelTitle title="认购分析" />
    <div class="mt">
      

      <table>
        <thead>
          <tr>
            <th style="width: 25%;">企业名称</th>
            <th style="width: 25%">所属乡镇</th>
            <th style="width: 25%;">种子领用量</th>
            <th style="width: 25%;">锁定交易额</th>
            
          </tr>
        </thead>
      </table>
      <loopScroll class="loop-scroll">
        <table>
          <tbody>
            <tr v-for="item in list">
              <td style="width: 25%;">{{ item.name }}</td>
              <td style="width: 25%">
                {{ item.streetName }}

              </td>
              <td style="width: 25%;">{{ item.seedNum }} kg</td>
              <td style="width: 25%;">{{ (item.tradeMoney / 10000).toFixed(2) }} 万</td>
             
            </tr>
          </tbody>
        </table>
      </loopScroll>
    </div>
  </div>
</template>

<script setup>
import { ref, onMounted } from "vue";
import echarts from "@/components/echarts";
import PanelTitle from "../../component/PanelTitle.vue";
import http from "@/api/http";
import { env } from "@/utils/env";

import loopScroll from "@/components/loopScroll.vue";
let list = ref([]);

onMounted(async () => {
  
  let res = await http({
    url: env.VITE_ZHER_DATA_CENTER + "/property/buy/main/list",
    method: "get",
    params : {
      pageNum: 1,
      pageSize: 10000
      // keyEnt: '',
      // yearly: ''
    }
  })
  
  console.log(res)
  list.value = res.data.list
  // let res = await http({
  //   url: env.VITE_ZHER_DATA_CENTER + "/property/main/list",
  //   method: "get",
  //   params: {
  //     pageNum: 1,
  //     pageSize: 8,
  //     keyEnt: 1,
  //     yearly: new Date().getFullYear()
  //   },
  // });

  // enterpriseList.value = res.data.list
});

</script>


<style scoped lang="scss">
.contents {
  background: linear-gradient(to bottom,
      rgba(5, 79, 99),
      rgba(5, 79, 99, 0.1),
      rgba(5, 79, 99));
  border-radius: vh(8);
  border: vh(1) solid rgba(6, 112, 180, 1);

  .mt {
    margin-top: vh(-30);
  }
}

.maps {
  height: vh(100);
  width: 100%;
}


table,
th,
td {
  border: vh(1) solid #2cd7bc;
  border-collapse: collapse;

  font-family: Source Han Sans CN;
  font-weight: 500;
  font-size: vh(10);
  text-align: center;
}

.loop-scroll{
  height: 30vh;
  width: vw(344);
  margin: 0 auto;
}

table {
  width: vw(344);
  margin: 0 auto;
}

th {
  color: #fff;
  background: rgba(50, 200, 167, 0.45);
  min-width: vw(60);
  line-height: vh(20);
  padding: vh(9) vw(9);
}

td {
  color: #2cd7bc;
  line-height: vh(14);
  padding: vh(9) vw(9);
}
</style>